package com.sen.dao;


import com.baomidou.mybatisplus.core.conditions.Wrapper;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.core.toolkit.Constants;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.sen.entity.DruginfoEntity;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;
import java.util.Map;

/**
 * 药品信息表
 *
 * @author chenshun
 * @email sunlightcs@gmail.com
 * @date 2021-01-08 17:54:40
 */
@Mapper
@Repository
public interface DruginfoDao extends BaseMapper<DruginfoEntity> {

    IPage<DruginfoEntity> queryAllDrug(@Param("page") Page<DruginfoEntity> page, @Param("druginfo") Map<String, String> druginfo, @Param("types")List<Integer> types);
    //采购查询仓库
    IPage<DruginfoEntity> queryAllDrug2(Page<DruginfoEntity> page,@Param(Constants.WRAPPER) Wrapper<DruginfoEntity> userWrapper);

    IPage<DruginfoEntity> queryList(@Param("page") Page<DruginfoEntity> page, @Param("druginfo") Map<String, String> druginfo, @Param("types") List<Integer> types);

    List<Integer> queryType(String tid);

    String getMedno();

    List<DruginfoEntity> queryWarehouse(Integer mid);
}
